package model

import "encoding/json"

type Profile struct {
	//昵称
	Name string
	//主页
	Avatar string
	//年龄
	Age int
	//学历
	Education string
	//婚况
	Marriage string
	//省份
	Province string
	//简介
	Introduce string
	//身高
	Stature int
}

func FromJsonObj(o interface{}) (Profile,error) {
	var profile Profile
	bytes, err := json.Marshal(o)
	if err != nil{
		return profile,err
	}
	err = json.Unmarshal(bytes, &profile)
	return profile,err
}
